package com.lh.java.basic.grammer;

import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
import java.util.Calendar;

public class WhatIsCalendarWrite {
	public static void main(String[] args) throws Exception {
//		ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(
//				"d:/calendar.txt"));
		Calendar cal1 = Calendar.getInstance();
		cal1.set(2000, 7, 1, 0, 0, 0);
//		cal1.set(Calendar.MILLISECOND, 0);
//		out.writeObject(cal1.toString());
		System.out.println(cal1.toString());
		Calendar cal2 = Calendar.getInstance();
		cal2.set(2000, 7, 1, 0, 0, 0);
		cal2.set(Calendar.MILLISECOND, 0);
//		out.writeObject(cal2.toString());
		System.out.println(cal2.toString());
		if(cal1.equals(cal1)){
			System.out.println("haha");
		}
		System.out.println(cal1.hashCode());
		System.out.println(cal2.hashCode());
		System.out.println("==============");
		System.out.println(cal1.getTime().getTime());
		System.out.println(cal1.getTimeInMillis());
		System.out.println(cal1.getTime());
		cal1.set(2000, 9, 1, 0, 0, 0);
		System.out.println(cal1.getTime());
//		out.close();
	}
}
